package org.example.framework.exception;

import org.example.framework.model.response.ResultCode;

/**
 * @author wwy
 * @date 2020-11-02 19:38
 */
public class CustomException extends RuntimeException {
    //错误代码
    private ResultCode resultCode;

    /**
     * 构造方法，用来指定异常展示的格式,主要是resultCode要响应给用户
     * @param resultCode
     */
    public CustomException(ResultCode resultCode){
        this.resultCode = resultCode;
    }
    public ResultCode getResultCode(){
        return resultCode;
    }
}
